package com.xjgzinfo.usdp.service.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.persistence.Lob;
import javax.validation.constraints.Max;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.time.Instant;

/**
 * A DTO for the {@link com.xjgzinfo.usdp.domain.BladeVisual} entity.
 */
@ApiModel(description = "大屏页面 @author  jxw")
public class BladeVisualDTO implements Serializable {

    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long id;

    /**
     * 大屏背景
     */
    @ApiModelProperty(value = "大屏背景")
    @Lob
    private String backgroundUrl;

    /**
     * 大屏类型
     */
    @ApiModelProperty(value = "大屏类型")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long category;

    /**
     * 大屏标题
     */
    @Size(max = 255)
    @ApiModelProperty(value = "大屏标题")
    private String title;

    /**
     * 修改人
     */
    @ApiModelProperty(value = "修改人")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long updateUser;

    /**
     * 发布密码
     */
    @Size(max = 255)
    @ApiModelProperty(value = "发布密码")
    private String password;

    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    private Long createUser;

    /**
     * 修改时间
     */
    @ApiModelProperty(value = "修改时间")
    private Instant updateTime;

    /**
     * 创建部门
     */
    @ApiModelProperty(value = "创建部门")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long createDept;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    private Instant createTime;

    /**
     * 状态
     */

    @Max(value = 10)
    @ApiModelProperty(value = "状态", required = true)
    private Integer status = 1;

    /**
     * 是否已删除
     */

    @Max(value = 10)
    @ApiModelProperty(value = "是否已删除", required = true)
    private Integer isDeleted = 0;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getBackgroundUrl() {
        return backgroundUrl;
    }

    public void setBackgroundUrl(String backgroundUrl) {
        this.backgroundUrl = backgroundUrl;
    }

    public Long getCategory() {
        return category;
    }

    public void setCategory(Long category) {
        this.category = category;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Long getUpdateUser() {
        return updateUser;
    }

    public void setUpdateUser(Long updateUser) {
        this.updateUser = updateUser;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Long getCreateUser() {
        return createUser;
    }

    public void setCreateUser(Long createUser) {
        this.createUser = createUser;
    }

    public Instant getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Instant updateTime) {
        this.updateTime = updateTime;
    }

    public Long getCreateDept() {
        return createDept;
    }

    public void setCreateDept(Long createDept) {
        this.createDept = createDept;
    }

    public Instant getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Instant createTime) {
        this.createTime = createTime;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof BladeVisualDTO)) {
            return false;
        }

        return id != null && id.equals(((BladeVisualDTO) o).id);
    }

    @Override
    public int hashCode() {
        return 31;
    }

    // prettier-ignore
    @Override
    public String toString() {
        return "BladeVisualDTO{" +
                "id=" + getId() +
                ", backgroundUrl='" + getBackgroundUrl() + "'" +
                ", category=" + getCategory() +
                ", title='" + getTitle() + "'" +
                ", updateUser=" + getUpdateUser() +
                ", password='" + getPassword() + "'" +
                ", createUser=" + getCreateUser() +
                ", updateTime='" + getUpdateTime() + "'" +
                ", createDept=" + getCreateDept() +
                ", createTime='" + getCreateTime() + "'" +
                ", status=" + getStatus() +
                ", isDeleted=" + getIsDeleted() +
                "}";
    }
}
